<%@ page language="java" import="java.util.*" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@include file="/context/mytags.jsp"%>
<!DOCTYPE html>
<html>
 <head>
  <title>实验室项目</title>
  <t:base type="jquery,easyui,tools,DatePicker"></t:base>
 </head>
 <body>
  <t:formvalid formid="formobj" dialog="true"  layout="table" tiptype="3" >
		<input id="id" name="id" type="hidden" value="${project.id }">
		<table style="" cellpadding="0" cellspacing="1" class="formtable"> 
					
				<tr>
					<td align="right">
						<label class="Validform_label">
							项目编号:
						</label>
					</td>
					<td class="value"> 
                	                     
					     <input id="projectNO" name="projectNO" type="text" style="width: 150px" class="inputxt" datatype="*" value='${project.projectNO}'>
					     
						<span class="Validform_checktip"></span>
						<label class="Validform_label" style="display: none;">项目编号</label>
						
					</td>
					
				</tr>
				<tr>
					<td align="right">
						<label class="Validform_label">
							项目名称:
						</label>
					</td>
					<td class="value">
					     <input id="projectName" name="projectName" type="text"  value="${project.projectName}"
					     	style="width: 250px" class="inputxt"   maxlength="100"  onkeypress="specialTextValidate()">
  					</td>
				</tr>
				<tr>
					<td align="right">
						<label class="Validform_label">
							学时:
						</label>
					</td>
					<td class="value">
						<input id="hour" value='${project.hour}'  onkeypress="numberValidate()"  name="hour" type="text" style="width: 100px" class="inputxt" maxlength="5"> 
					</td>
				</tr>
				<tr>
					<td align="right">
						<label class="Validform_label">
							每组人数:
						</label>
					</td>
					<td class="value">
					    <input id="groupPeopleCount" value='${project.groupPeopleCount}'  
					    name="groupPeopleCount" type="text" style="width: 100px"
					    onkeypress="numberValidate()"
						class="inputxt" maxlength="5">
  					</td>
				</tr>
			</table>
		</t:formvalid>
		<script>
	 
		
		$(document).ready(function(){
			 
			var id = $('#id').val();
			if(id.length < 10 && w.currentModProject != undefined){ //修改未保存的信息，需要从内存中读取
				var staff = w.currentModProject;
 				$('#projectName').val(staff.projectName);
				$('#id').val(staff.id);
				$('#hour').val(staff.hour);
				$('#groupPeopleCount').val(staff.groupPeopleCount);
				$('#projectNO').val(staff.projectNO);
				 
			}
		});
		
		//根据form表单内容，获取staff对象
		function getProject(){
			var projectNO = $('#projectNO').val();
			var projectName = $('#projectName').val();
			var id = $('#id').val();
			var hour = $('#hour').val();
			var groupPeopleCount = $('#groupPeopleCount').val();
			 
		
			var staff = {
					projectNO:projectNO,
					projectName:projectName,
					id:id,
					hour:hour,
					groupPeopleCount:groupPeopleCount,
					 
			}
		
			return staff;
		}
		</script>
 </body>
 